package tests;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import passengers.FireFighter;

import vehicles.FireFighterCar;

public class FireFighterCarTest {

	FireFighterCar fireFighterCar;
	
	@Before
	public void setUp() throws Exception {
		fireFighterCar = new FireFighterCar();
		for(int i = 0; i < 10; i++){
			fireFighterCar.putPassenger(new FireFighter(i));
		}
	}
	
	@Test
	public void testGetSeatsAmount() {
		assertEquals(10, fireFighterCar.getSeatsAmount());
	}

	@Test
	public void testGetOccupaidSeatsAmount() {
		assertEquals(10, fireFighterCar.getOccupaidSeatsAmount());
	}

	@Test(expected=RuntimeException.class)
	public void testPutPassenger() {
		fireFighterCar.putPassenger(new FireFighter(10));
	}

	@Test(expected=RuntimeException.class)
	public void testGetPassenger() {
		fireFighterCar.getPassenger(new FireFighter(11));
	}

}
